<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function max(){
            var max = arguments[0];
            for(var i = 0; i < arguments.length; i++){
                if(arguments[i] > max){
                    max = arguments[i];
                }
            }
            return max;
        }
        var result = max(+prompt('请输入第一个值'), +prompt('请输入第二个值'), +prompt('请输入第三个值'));
        alert('最大值' + result);
    </script>
</body>
</html>